@echo off
@color a

set a=%RANDOM%%RANDOM%%RANDOM%
echo %a%

echo %cd% >%a%.txt


if exist "index.html" (
    findstr "dist" %a%.txt && (
        php a.php  %a%
        rename index.html index_%a%.html
        7z a -xr"@exclude.txt" -tzip pack_%a%.zip *
        del *.js
        del *.css
        del *.html
        del *.php
        del *.json
        del *.tpl
        del *.txt
        rd /q /s static
        del *.bat
        echo Pack files success!
        pause
    )
) ELSE (
    del %a%.txt
    echo Warn! Please run at dist directory,current directory is: %cd%
    pause
)



